package com.baize.minespace.service.impl;

import com.baize.minespace.mapper.PostContentMapper;
import com.baize.minespace.pojo.PostContent;
import com.baize.minespace.service.PostContentService;
import com.baize.minespace.utils.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 文章内容表 服务实现类
 * </p>
 *
 * @author baize
 * @since 2024-04-15
 * @version ${cfg.version}
 */
@Service
public class PostContentServiceImpl extends ServiceImpl<PostContentMapper, PostContent> implements PostContentService {
    @Override
    public Result<IPage<PostContent>>selectPostContentPage(Integer rows,Integer page,PostContent postContent){
        Page<PostContent> postContentPage=new Page<>(rows,page);
        IPage<PostContent> postContentIPage=baseMapper.selectPostContentPage(postContentPage, postContent);
        return Result.success(postContentIPage);
    }
}
